3.367 \(\int \frac{\cot ^3(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=154 \[ \frac{b^4}{4 a^3 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )^2}-\frac{b^3 (2 a+b)}{a^3 f (a+b)^3 \left (a \cos ^2(e+f x)+b\right )}-\frac{b^2 \left (6 a^2+4 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^4}-\frac{\csc ^2(e+f x)}{2 f (a+b)^3}-\frac{(a+4 b) \log (\sin (e+f x))}{f (a+b)^4} \]

[Out]

b^4/(4*a^3*(a + b)^2*f*(b + a*Cos[e + f*x]^2)^2) - (b^3*(2*a + b))/(a^3*(a + b)^3*f*(b + a*Cos[e + f*x]^2)) -
Csc[e + f*x]^2/(2*(a + b)^3*f) - (b^2*(6*a^2 + 4*a*b + b^2)*Log[b + a*Cos[e + f*x]^2])/(2*a^3*(a + b)^4*f) - (
(a + 4*b)*Log[Sin[e + f*x]])/((a + b)^4*f)

________________________________________________________________________________________

Rubi [A]  time = 0.208823, antiderivative size = 154, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4138, 446, 88} \[ \frac{b^4}{4 a^3 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )^2}-\frac{b^3 (2 a+b)}{a^3 f (a+b)^3 \left (a \cos ^2(e+f x)+b\right )}-\frac{b^2 \left (6 a^2+4 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^4}-\frac{\csc ^2(e+f x)}{2 f (a+b)^3}-\frac{(a+4 b) \log (\sin (e+f x))}{f (a+b)^4} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^3/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

b^4/(4*a^3*(a + b)^2*f*(b + a*Cos[e + f*x]^2)^2) - (b^3*(2*a + b))/(a^3*(a + b)^3*f*(b + a*Cos[e + f*x]^2)) -
Csc[e + f*x]^2/(2*(a + b)^3*f) - (b^2*(6*a^2 + 4*a*b + b^2)*Log[b + a*Cos[e + f*x]^2])/(2*a^3*(a + b)^4*f) - (
(a + 4*b)*Log[Sin[e + f*x]])/((a + b)^4*f)

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps

\begin{align*} \int \frac{\cot ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^9}{\left (1-x^2\right )^2 \left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{x^4}{(1-x)^2 (b+a x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{1}{(a+b)^3 (-1+x)^2}+\frac{a+4 b}{(a+b)^4 (-1+x)}+\frac{b^4}{a^2 (a+b)^2 (b+a x)^3}-\frac{2 b^3 (2 a+b)}{a^2 (a+b)^3 (b+a x)^2}+\frac{b^2 \left (6 a^2+4 a b+b^2\right )}{a^2 (a+b)^4 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac{b^4}{4 a^3 (a+b)^2 f \left (b+a \cos ^2(e+f x)\right )^2}-\frac{b^3 (2 a+b)}{a^3 (a+b)^3 f \left (b+a \cos ^2(e+f x)\right )}-\frac{\csc ^2(e+f x)}{2 (a+b)^3 f}-\frac{b^2 \left (6 a^2+4 a b+b^2\right ) \log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 (a+b)^4 f}-\frac{(a+4 b) \log (\sin (e+f x))}{(a+b)^4 f}\\ \end{align*}

Mathematica [A]  time = 1.93355, size = 176, normalized size = 1.14 \[ -\frac{\sec ^6(e+f x) (a \cos (2 (e+f x))+a+2 b)^3 \left (-\frac{b^4 (a+b)^2}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )^2}+\frac{4 b^3 (a+b) (2 a+b)}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )}+\frac{2 b^2 \left (6 a^2+4 a b+b^2\right ) \log \left (-a \sin ^2(e+f x)+a+b\right )}{a^3}+2 (a+b) \csc ^2(e+f x)+4 (a+4 b) \log (\sin (e+f x))\right )}{32 f (a+b)^4 \left (a+b \sec ^2(e+f x)\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^3/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-((a + 2*b + a*Cos[2*(e + f*x)])^3*Sec[e + f*x]^6*(2*(a + b)*Csc[e + f*x]^2 + 4*(a + 4*b)*Log[Sin[e + f*x]] +
(2*b^2*(6*a^2 + 4*a*b + b^2)*Log[a + b - a*Sin[e + f*x]^2])/a^3 - (b^4*(a + b)^2)/(a^3*(a + b - a*Sin[e + f*x]
^2)^2) + (4*b^3*(a + b)*(2*a + b))/(a^3*(a + b - a*Sin[e + f*x]^2))))/(32*(a + b)^4*f*(a + b*Sec[e + f*x]^2)^3
)

________________________________________________________________________________________

Maple [B]  time = 0.115, size = 389, normalized size = 2.5 \begin{align*} -3\,{\frac{{b}^{2}\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{f \left ( a+b \right ) ^{4}a}}-2\,{\frac{{b}^{3}\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{f \left ( a+b \right ) ^{4}{a}^{2}}}-{\frac{{b}^{4}\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,f \left ( a+b \right ) ^{4}{a}^{3}}}-2\,{\frac{{b}^{3}}{f \left ( a+b \right ) ^{4}a \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}-3\,{\frac{{b}^{4}}{f \left ( a+b \right ) ^{4}{a}^{2} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{{b}^{5}}{f \left ( a+b \right ) ^{4}{a}^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }}+{\frac{{b}^{4}}{4\,f \left ( a+b \right ) ^{4}a \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{{b}^{5}}{2\,f \left ( a+b \right ) ^{4}{a}^{2} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{{b}^{6}}{4\,f \left ( a+b \right ) ^{4}{a}^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{1}{4\,f \left ( a+b \right ) ^{3} \left ( 1+\cos \left ( fx+e \right ) \right ) }}-{\frac{\ln \left ( 1+\cos \left ( fx+e \right ) \right ) a}{2\,f \left ( a+b \right ) ^{4}}}-2\,{\frac{\ln \left ( 1+\cos \left ( fx+e \right ) \right ) b}{f \left ( a+b \right ) ^{4}}}+{\frac{1}{4\,f \left ( a+b \right ) ^{3} \left ( -1+\cos \left ( fx+e \right ) \right ) }}-{\frac{\ln \left ( -1+\cos \left ( fx+e \right ) \right ) a}{2\,f \left ( a+b \right ) ^{4}}}-2\,{\frac{\ln \left ( -1+\cos \left ( fx+e \right ) \right ) b}{f \left ( a+b \right ) ^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^3/(a+b*sec(f*x+e)^2)^3,x)

[Out]

-3/f*b^2/(a+b)^4/a*ln(b+a*cos(f*x+e)^2)-2/f*b^3/(a+b)^4/a^2*ln(b+a*cos(f*x+e)^2)-1/2/f*b^4/(a+b)^4/a^3*ln(b+a*
cos(f*x+e)^2)-2/f*b^3/(a+b)^4/a/(b+a*cos(f*x+e)^2)-3/f*b^4/(a+b)^4/a^2/(b+a*cos(f*x+e)^2)-1/f*b^5/(a+b)^4/a^3/
(b+a*cos(f*x+e)^2)+1/4/f*b^4/(a+b)^4/a/(b+a*cos(f*x+e)^2)^2+1/2/f*b^5/(a+b)^4/a^2/(b+a*cos(f*x+e)^2)^2+1/4/f*b
^6/(a+b)^4/a^3/(b+a*cos(f*x+e)^2)^2-1/4/f/(a+b)^3/(1+cos(f*x+e))-1/2/f/(a+b)^4*ln(1+cos(f*x+e))*a-2/f/(a+b)^4*
ln(1+cos(f*x+e))*b+1/4/f/(a+b)^3/(-1+cos(f*x+e))-1/2/f/(a+b)^4*ln(-1+cos(f*x+e))*a-2/f/(a+b)^4*ln(-1+cos(f*x+e
))*b

________________________________________________________________________________________

Maxima [B]  time = 1.04002, size = 464, normalized size = 3.01 \begin{align*} -\frac{\frac{2 \,{\left (6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{7} + 4 \, a^{6} b + 6 \, a^{5} b^{2} + 4 \, a^{4} b^{3} + a^{3} b^{4}} + \frac{2 \,{\left (a + 4 \, b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}} + \frac{2 \, a^{5} + 4 \, a^{4} b + 2 \, a^{3} b^{2} + 2 \,{\left (a^{5} - 4 \, a^{2} b^{3} - 2 \, a b^{4}\right )} \sin \left (f x + e\right )^{4} -{\left (4 \, a^{5} + 4 \, a^{4} b - 8 \, a^{2} b^{3} - 11 \, a b^{4} - 3 \, b^{5}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3}\right )} \sin \left (f x + e\right )^{6} - 2 \,{\left (a^{8} + 4 \, a^{7} b + 6 \, a^{6} b^{2} + 4 \, a^{5} b^{3} + a^{4} b^{4}\right )} \sin \left (f x + e\right )^{4} +{\left (a^{8} + 5 \, a^{7} b + 10 \, a^{6} b^{2} + 10 \, a^{5} b^{3} + 5 \, a^{4} b^{4} + a^{3} b^{5}\right )} \sin \left (f x + e\right )^{2}}}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

-1/4*(2*(6*a^2*b^2 + 4*a*b^3 + b^4)*log(a*sin(f*x + e)^2 - a - b)/(a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + a^3
*b^4) + 2*(a + 4*b)*log(sin(f*x + e)^2)/(a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4) + (2*a^5 + 4*a^4*b + 2*a^3
*b^2 + 2*(a^5 - 4*a^2*b^3 - 2*a*b^4)*sin(f*x + e)^4 - (4*a^5 + 4*a^4*b - 8*a^2*b^3 - 11*a*b^4 - 3*b^5)*sin(f*x
 + e)^2)/((a^8 + 3*a^7*b + 3*a^6*b^2 + a^5*b^3)*sin(f*x + e)^6 - 2*(a^8 + 4*a^7*b + 6*a^6*b^2 + 4*a^5*b^3 + a^
4*b^4)*sin(f*x + e)^4 + (a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5*a^4*b^4 + a^3*b^5)*sin(f*x + e)^2))/f

________________________________________________________________________________________

Fricas [B]  time = 3.33967, size = 1234, normalized size = 8.01 \begin{align*} \frac{2 \, a^{4} b^{2} + 2 \, a^{3} b^{3} + 7 \, a^{2} b^{4} + 10 \, a b^{5} + 3 \, b^{6} + 2 \,{\left (a^{6} + a^{5} b - 4 \, a^{3} b^{3} - 6 \, a^{2} b^{4} - 2 \, a b^{5}\right )} \cos \left (f x + e\right )^{4} +{\left (4 \, a^{5} b + 4 \, a^{4} b^{2} + 8 \, a^{3} b^{3} + 5 \, a^{2} b^{4} - 6 \, a b^{5} - 3 \, b^{6}\right )} \cos \left (f x + e\right )^{2} - 2 \,{\left ({\left (6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4}\right )} \cos \left (f x + e\right )^{6} - 6 \, a^{2} b^{4} - 4 \, a b^{5} - b^{6} -{\left (6 \, a^{4} b^{2} - 8 \, a^{3} b^{3} - 7 \, a^{2} b^{4} - 2 \, a b^{5}\right )} \cos \left (f x + e\right )^{4} -{\left (12 \, a^{3} b^{3} + 2 \, a^{2} b^{4} - 2 \, a b^{5} - b^{6}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) - 4 \,{\left ({\left (a^{6} + 4 \, a^{5} b\right )} \cos \left (f x + e\right )^{6} - a^{4} b^{2} - 4 \, a^{3} b^{3} -{\left (a^{6} + 2 \, a^{5} b - 8 \, a^{4} b^{2}\right )} \cos \left (f x + e\right )^{4} -{\left (2 \, a^{5} b + 7 \, a^{4} b^{2} - 4 \, a^{3} b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (f x + e\right )\right )}{4 \,{\left ({\left (a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} f \cos \left (f x + e\right )^{6} -{\left (a^{9} + 2 \, a^{8} b - 2 \, a^{7} b^{2} - 8 \, a^{6} b^{3} - 7 \, a^{5} b^{4} - 2 \, a^{4} b^{5}\right )} f \cos \left (f x + e\right )^{4} -{\left (2 \, a^{8} b + 7 \, a^{7} b^{2} + 8 \, a^{6} b^{3} + 2 \, a^{5} b^{4} - 2 \, a^{4} b^{5} - a^{3} b^{6}\right )} f \cos \left (f x + e\right )^{2} -{\left (a^{7} b^{2} + 4 \, a^{6} b^{3} + 6 \, a^{5} b^{4} + 4 \, a^{4} b^{5} + a^{3} b^{6}\right )} f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

1/4*(2*a^4*b^2 + 2*a^3*b^3 + 7*a^2*b^4 + 10*a*b^5 + 3*b^6 + 2*(a^6 + a^5*b - 4*a^3*b^3 - 6*a^2*b^4 - 2*a*b^5)*
cos(f*x + e)^4 + (4*a^5*b + 4*a^4*b^2 + 8*a^3*b^3 + 5*a^2*b^4 - 6*a*b^5 - 3*b^6)*cos(f*x + e)^2 - 2*((6*a^4*b^
2 + 4*a^3*b^3 + a^2*b^4)*cos(f*x + e)^6 - 6*a^2*b^4 - 4*a*b^5 - b^6 - (6*a^4*b^2 - 8*a^3*b^3 - 7*a^2*b^4 - 2*a
*b^5)*cos(f*x + e)^4 - (12*a^3*b^3 + 2*a^2*b^4 - 2*a*b^5 - b^6)*cos(f*x + e)^2)*log(a*cos(f*x + e)^2 + b) - 4*
((a^6 + 4*a^5*b)*cos(f*x + e)^6 - a^4*b^2 - 4*a^3*b^3 - (a^6 + 2*a^5*b - 8*a^4*b^2)*cos(f*x + e)^4 - (2*a^5*b
+ 7*a^4*b^2 - 4*a^3*b^3)*cos(f*x + e)^2)*log(1/2*sin(f*x + e)))/((a^9 + 4*a^8*b + 6*a^7*b^2 + 4*a^6*b^3 + a^5*
b^4)*f*cos(f*x + e)^6 - (a^9 + 2*a^8*b - 2*a^7*b^2 - 8*a^6*b^3 - 7*a^5*b^4 - 2*a^4*b^5)*f*cos(f*x + e)^4 - (2*
a^8*b + 7*a^7*b^2 + 8*a^6*b^3 + 2*a^5*b^4 - 2*a^4*b^5 - a^3*b^6)*f*cos(f*x + e)^2 - (a^7*b^2 + 4*a^6*b^3 + 6*a
^5*b^4 + 4*a^4*b^5 + a^3*b^6)*f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**3/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.60081, size = 1530, normalized size = 9.94 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/8*(4*(6*a^2*b^2 + 4*a*b^3 + b^4)*log(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x + e)
- 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos(f*x + e) +
 1)^2)/(a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + a^3*b^4) + 4*(a + 4*b)*log(-(cos(f*x + e) - 1)/(cos(f*x + e) +
 1))/(a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4) - (a + b + 4*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 16*b*(
cos(f*x + e) - 1)/(cos(f*x + e) + 1))*(cos(f*x + e) + 1)/((a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*(cos(f*x
 + e) - 1)) - (cos(f*x + e) - 1)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(cos(f*x + e) + 1)) - 2*(18*a^4*b^2 + 48*a^3
*b^3 + 45*a^2*b^4 + 18*a*b^5 + 3*b^6 + 72*a^4*b^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 80*a^3*b^3*(cos(f*x
+ e) - 1)/(cos(f*x + e) + 1) - 20*a^2*b^4*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 40*a*b^5*(cos(f*x + e) - 1)/
(cos(f*x + e) + 1) - 12*b^6*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 108*a^4*b^2*(cos(f*x + e) - 1)^2/(cos(f*x
+ e) + 1)^2 + 64*a^3*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 46*a^2*b^4*(cos(f*x + e) - 1)^2/(cos(f*x
+ e) + 1)^2 + 44*a*b^5*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 18*b^6*(cos(f*x + e) - 1)^2/(cos(f*x + e) +
 1)^2 + 72*a^4*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 80*a^3*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) +
 1)^3 - 20*a^2*b^4*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 40*a*b^5*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1
)^3 - 12*b^6*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 18*a^4*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4
+ 48*a^3*b^3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 45*a^2*b^4*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4
+ 18*a*b^5*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 3*b^6*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4)/((a^7
+ 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + a^3*b^4)*(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x
 + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos(f*x
+ e) + 1)^2)^2) - 8*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1)/a^3)/f